﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CircuitBoardApplication.Classes.Components
{
    class Sink : ComponentMain
    {
        public Sink(int id, String type, int value, int x, int y)
            : base(id, type, value, x, y)
        {
            ID = id;
            Type = type;
            Value = value;
            X = x;
            Y = y;
        }

        public override void DrawItself(System.Drawing.Graphics gr, System.Windows.Forms.ImageList il)
        {
            int diameter = 2 * ComponentMain.radius;
            if (Value == 1)
            {
                gr.DrawImage(il.Images[6], this.X - ComponentMain.radius, this.Y - ComponentMain.radius, diameter, diameter);
            }
            else if (Value == 0)
            {
                gr.DrawImage(il.Images[5], this.X - ComponentMain.radius, this.Y - ComponentMain.radius, diameter, diameter);
            }
        }

        /*public override bool Calculate()
        {
            if (Value == true)
                return true;
            else
                return false;
        }*/
    }
}
